
#include <mockcpp/mockcpp.hpp>
#include <testngpp/testngpp.hpp>
#include <Rectangle.h>

USING_MOCKCPP_NS
USING_TESTNGPP_NS

FIXTURE(Rectangle)
{
	TEST(perimeter should 18 with length 6 and width 3)
	{
		Rectangle rectangle(6,3);
		ASSERT_EQ(18, rectangle.getPerimeter());
	}

	TEST(area should 15 with length 5 and width 3)
	{
		Rectangle rectangle(5,3);
		ASSERT_EQ(15, rectangle.getArea());
	}
	TEST(perimeter should 22 with length 8 and width 3)
        {
                Rectangle rectangle(6,3);
		rectangle.setLength(8);
                ASSERT_EQ(22, rectangle.getPerimeter());
        }

	TEST(perimeter should 30 with length 6 and width 9)
        {
                Rectangle rectangle(6,3);
                rectangle.setWidth(9);
                ASSERT_EQ(30, rectangle.getPerimeter());
        }

        TEST(area should 72 with length 12 and width 6)
        {
                Rectangle rectangle(5,3);
                ASSERT_EQ(15, rectangle.getArea());
		rectangle.setLength(12);
                ASSERT_EQ(36, rectangle.getArea());
		rectangle.setWidth(6);
                ASSERT_EQ(72, rectangle.getArea());

        }

};
